public class ArrayTest {

  public static void main(String[] args) {

    int[] a = {1, 2, 3, 4, 5, 6};
    for (int i = 0; i < a.length; i++)
      System.out.print(a[i] + " ");
    System.out.println();

    for (int element : a)
      System.out.print(element + " ");
    System.out.println();
  }

}
